package com.example.b_308.office.view;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;import android.util.Log;import com.alibaba.fastjson.JSON;import com.example.b_308.medical.R;import com.example.b_308.office.comment.User;public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);        setContentView(R.layout.activity_main);        User user = new User();        user.setName("佛职院");        user.setSex(0);        String json = JSON.toJSONString(user);        Log.d("之间的转", json);        user=null;        user=JSON.parseObject(json,User.class);        Log.d("之间的转-name",user.getName() );        Log.d("之间的转-sex",""+user.getSex() );    }}